{% extends 'base.html' %}
{% block title %}首页展示{% endblock %}
{% block nav %}
 <!-- 数据展示 -->
<div class="container">
    <table class="table table-hover">
        <!-- 表头 -->
        <thead>
        <tr>
            <th>id</th>
            <th>用户名</th>
            <th>密码</th>
            <th>年龄</th>
            <th>邮箱</th>
            <th>创建时间</th>
            <th>操作</th>
        </tr>
        </thead>
        <!-- 表内容 -->
        <tbody>
        {% for user in users %}
        <tr>
            <td>{{ user.id }}</td>
            <td>{{ user.username }}</td>
            <td>{{ user.password }}</td>
            <td>{{ user.age }}</td>
            <td>{{ user.email }}</td>
            <td>{{ user.createDatetime|date:'Y-m-d H:i:s' }}</td>
            <td>
                <a href="{% url 'alter' user.id%}">修改</a>
                <a href="{% url 'del' user.id %}">删除</a>
            </td>
            {% endfor %}

        </tr>

        </tbody>
    </table>
</div>
{% endblock %}